import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import router from './router'


const app = createApp(App)
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
import WDialog from '../src/components/WDialog.vue'
import store from './store'
// import "../src/assets/theme.less";
// import "../src/assets/global.css";
// import "../src/assets/iconfont/iconfont.css"
import "../src/styles/smart-flow-design.less"

import flow from '../src/components/index';



app.config.globalProperties.$isNotEmpty = function(obj){
    return (obj !== undefined && obj !== null && obj !== '' && obj !== 'null')
}

app.config.globalProperties.$getDefalut = function(obj, key, df){
    return (obj === undefined || key === undefined || !this.$isNotEmpty(obj[key])) ? df : obj[key];
}

app.config.globalProperties.$deepCopy = function (obj){return JSON.parse(JSON.stringify(obj))}

app.use(router)
    .use(store)
    .use(flow)
    .component('WDialog',WDialog)
    .mount('#app')
